part of '../../store.dart';

class _StoreContentMetadataDtoFactory {
  const _StoreContentMetadataDtoFactory._internal();

  static const _instance = _StoreContentMetadataDtoFactory._internal();

  factory _StoreContentMetadataDtoFactory() {
    return _instance;
  }

  _StoreContentMetadataDto fromJson(Map<String, dynamic> json) {
    final version = json[_kStoreContentMetadataVersionKey] as int;

    switch (version) {
      case 1:
        return _StoreContentMetadataV1Dto.fromJson(json);
      default:
        throw UnimplementedError();
    }
  }
}
